//
//  ViewController.swift
//  SwiftLNGDemo
//
//  Created by sun on 2022/7/27.
//

import UIKit

class ViewController: UIViewController {
    var starTime:CLongLong?
    
    override func loadView() {
        super.loadView()
        starTime = Date().milliStamp
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        dateTest()
    }
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        if let s = starTime {
            let endTime = Date().milliStamp
            let launchTime = endTime - s
            print("页面加载时间\(launchTime)")
        }
        
    }

    func dateTest() {
        print("当前时间戳毫秒级\(Date().milliStamp)")
        print("当前时间到毫秒\(Date().currentimeyyyyMMddHHmmssSSS())")
    }
}


